Skip to content

refactor(backend): decompose scanner.py orchestrator (#2364)#2474

Merged
mrveiss merged 1 commit intoDev_new_guifrom
refactor/decompose-scanner-orchestrator
Mar 26, 2026
Merged

refactor(backend): decompose scanner.py orchestrator (#2364)#2474
mrveiss merged 1 commit intoDev_new_guifrom
refactor/decompose-scanner-orchestrator

Conversation

@mrveiss
Copy link
Owner

@mrveiss mrveiss commented Mar 26, 2026

Summary

Decomposed scanner.py (~999 lines) into 4 focused modules:

Module Lines Responsibility
indexing_executor.py 64 Thread pool singleton + async dispatch
file_pipeline.py 335 File analysis, storage, iteration pipeline
indexing_phases.py 226 ChromaDB init → scan → store orchestration
subprocess_runner.py 175 Subprocess launch + watchdog supervision

scanner.py reduced to 425 lines (was 999) — a thin orchestrator with backward-compat re-exports. All public APIs preserved.

Closes #2364

Test plan

  • All pre-commit hooks pass (black, isort, flake8, bandit, function length)
  • All existing imports from scanner.py resolve correctly
  • Indexing functionality unchanged

Split scanner.py (999 lines) into focused modules:
- indexing_executor.py (64 lines) — thread pool singleton + async dispatch
- file_pipeline.py (335 lines) — file processing pipeline (analysis, storage, iteration)
- indexing_phases.py (226 lines) — ChromaDB init, scan, store orchestration
- subprocess_runner.py (175 lines) — subprocess launch + watchdog supervision

scanner.py reduced to 425-line thin orchestrator with backward-compat re-exports.
All public APIs preserved.
@mrveiss mrveiss merged commit 07576f3 into Dev_new_gui Mar 26, 2026
2 of 4 checks passed
@mrveiss mrveiss deleted the refactor/decompose-scanner-orchestrator branch March 26, 2026 18:21
@github-actions
Copy link

✅ SSOT Configuration Compliance: Passing

🎉 No hardcoded values detected that have SSOT config equivalents!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant